<template>
  <view class="my-container">
    <login v-if="!token"></login>
    <user v-else class="compomets-user"></user>
  </view>
</template>

<script>
  import badgeMix from '@/mixins/tabbar-badge.js'
  import login from '@/componets/login/login.vue'
  import user from '@/componets/user/user.vue'
  import {
    mapState
  } from 'vuex'
  export default {
    components: {
      login,
      user
    },
    computed: {
      ...mapState('modulesUser',['token'])
    },
    mixins: [badgeMix]
  }
</script>

<style>
  page,
  .my-container {
    height: 100%;
  }
</style>
